package by.dkusch.aircompany.webapp.page.base.utils;

import org.apache.wicket.markup.html.form.IChoiceRenderer;

import by.dkusch.aircompany.model.tables.PlaneType;

public class PlaneTypeChoiseRenderer implements IChoiceRenderer<PlaneType> {

	private static final long serialVersionUID = 1L;
	public static PlaneTypeChoiseRenderer INSTANCE = new PlaneTypeChoiseRenderer();

	private PlaneTypeChoiseRenderer() {
		super();
	}

	@Override
	public Object getDisplayValue(PlaneType object) {
		return object != null ? object.getCode() : null;
	}

	@Override
	public String getIdValue(PlaneType object, int index) {
		// TODO Auto-generated method stub
		return object != null ? object.getId().toString() : null;
	}

}
